Suppress status messages on stderr when using -o json/yaml#314
Open
davixcky wants to merge 1 commit intofeature-planfrom
Open
Suppress status messages on stderr when using -o json/yaml#314davixcky wants to merge 1 commit intofeature-planfrom
davixcky wants to merge 1 commit intofeature-planfrom
Conversation
When structured output formats (JSON/YAML) are requested, skip printing "Tagged plan..." and "Created execution..." messages that would pollute stdout and break machine parsing. Also silence the spinner during polling in non-default output modes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
scott-cotton
approved these changes
Apr 8, 2026
Member
scott-cotton
left a comment
There was a problem hiding this comment.
LGTM
(Please be sure that any actual error messages still do go to stderr)
Contributor
Author
|
@scott-cotton Introduced Tested across all plan subcommands (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plan compile,plan create, andplan recompilewhen-o jsonor-o yamlis usedplan runwhen-o jsonor-o yamlis usedThese messages go to stderr (not stdout), so they don't technically break JSON parsing when stdout is piped directly. However, they do break common patterns like
command 2>&1 | jq .and add noise when structured output is requested.Reproduce (before)
Reproduce (after)
Test plan
plan compile --tag X -o json 2>&1produces clean JSON (no "Tagged plan..." line)plan compile --tag X(default mode) still shows "Tagged plan..." on stderrplan createandplan recompileplan run -o jsonsuppresses "Created execution..." and spinner on stderrplan run(default mode) still shows spinner and status messages🤖 Generated with Claude Code